package com.ce.pub.editor;

import java.io.File;

import com.ce.framework.datamaintain.action.BaseAction;
import com.ce.util.NetFileUtil;

public class EditorUploadAction extends BaseAction {
	private static final long serialVersionUID = 1L;
	private File filedata;
    private String filedataContentType;
	private String filedataFileName;
	public String execute() throws Exception {
		 String vcId = NetFileUtil.saveFile(filedata,filedataFileName,"editor");
		 this.writeHTML(vcId);
//		 this.writeJavaScript("callback('"+this.getRequest().getScheme()+"://"+this.getRequest().getServerName()+":"+this.getRequest().getServerPort()+this.getRequest().getContextPath()+"/"+NetFileUtil.getFileUrl(vcId)+"');");
		return null;
	}
	public File getFiledata() {
		return filedata;
	}
	public void setFiledata(File filedata) {
		this.filedata = filedata;
	}
	public String getFiledataContentType() {
		return filedataContentType;
	}
	public void setFiledataContentType(String filedataContentType) {
		this.filedataContentType = filedataContentType;
	}
	public String getFiledataFileName() {
		return filedataFileName;
	}
	public void setFiledataFileName(String filedataFileName) {
		this.filedataFileName = filedataFileName;
	}


}
